<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ page import="org.apache.shiro.SecurityUtils,org.apache.shiro.subject.Subject,com.lqz.model.ActiveUser" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@taglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c" %> 
<!DOCTYPE html>
<html>
<base href="<%=basePath%>">
<head>
<meta  charset="UTF-8">
<title>Insert title here</title>
<style type="text/css">
label{margin:30px 10px;}
</style>
</head>
<body>
<% 
Subject subject=SecurityUtils.getSubject();
if(subject.getPrincipal()!=null){
	ActiveUser activeUser=(ActiveUser) subject.getPrincipal();
	out.print("<h1>当前登录用户为："+activeUser.getUsercode()+"</h1>");
}else{

}

%>

<div>
<label><a href="<%=request.getContextPath()%>/cacheTest/get.do?userNo=2" target="view_frame">查看2号用户名 </a>
</label> <label>
<a href="<%=request.getContextPath()%>/cacheTest/get.do?userNo=3" target="view_frame">查看3号用户名  </a> 
</label> <label> 
权限进行：<a href="<%=request.getContextPath()%>/cacheTest/update.do?userNo=2" target="view_frame">更新2号用户名</a>  
</label> <label>
<a href="<%=request.getContextPath()%>/cacheTest/removeAll.do" target="view_frame">移除所有用户名</a>
</label> <label>
<a href="<%=request.getContextPath()%>/logout.do"  style="font-size: 30px;">重新登录</a>
</label> 
</div>
<iframe src="pref.html" name="view_frame" style="width:100%;height:500px;;"></iframe>
</body>

</html>